<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of IndexController
 *
 * @author Administrator
 */
namespace app\home\controller;
class IndexController extends BaseController{
    public function index(){
       $data['appid'] = 'wxabdca430796483e6';
       $data['timestamp'] = time();       
       $data['nonceStr'] = 'sgafADGFA';   
       ksort($data);
       $str = '';
       foreach ($data as $key => $value) {
           $str .= $key.'='.$value.'&';
       }
       
       $data['signature'] = sha1($str);
       
       return json(['code'=>1,'msg'=>'成功','data'=>$data]);
    }
}